package com.qiyu.mq.core.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author  idea
 * @version V1.0
 * @date 2020/8/10
 */
@ConfigurationProperties(prefix = "rocketmq.starter")
public class RocketMQProperties {

    private String nameServers;

    private MqConsumerConfig mqConsumerConfig;

    private MqProducerConfig mqProducerConfig;

    public RocketMQProperties() {
    }

    public RocketMQProperties(String nameServers) {
        this.nameServers = nameServers;
    }

    public RocketMQProperties(String nameServers, MqConsumerConfig mqConsumerConfig, MqProducerConfig mqProducerConfig) {
        this.nameServers = nameServers;
        this.mqConsumerConfig = mqConsumerConfig;
        this.mqProducerConfig = mqProducerConfig;
    }

    public String getNameServers() {
        return nameServers;
    }

    public void setNameServers(String nameServers) {
        this.nameServers = nameServers;
    }

    public MqConsumerConfig getMqConsumerConfig() {
        return mqConsumerConfig;
    }

    public void setMqConsumerConfig(MqConsumerConfig mqConsumerConfig) {
        this.mqConsumerConfig = mqConsumerConfig;
    }

    public MqProducerConfig getMqProducerConfig() {
        return mqProducerConfig;
    }

    public void setMqProducerConfig(MqProducerConfig mqProducerConfig) {
        this.mqProducerConfig = mqProducerConfig;
    }

    @Override
    public String toString() {
        return "RocketMQProperties{" +
                "nameServers='" + nameServers + '\'' +
                ", mqConsumerConfig=" + mqConsumerConfig +
                ", mqProducerConfig=" + mqProducerConfig +
                '}';
    }

}
